import http from '../utils/http.js'
/**
 * 查询所有管线
 */
export const listAllApi = () => {
  return http.post(`/washer/pipeline/listAll`)
}
/**
 * 以站场分组查询所有管线
 */
export const listAllWithStationApi = () => {
  return http.post(`/washer/pipeline/listWithStation`)
}
/**
 * 查询当前用户初始监控管线
 */
export const queryInitApi = () => {
  return http.post(`/washer/pipeline/query`)
}
/**
 * 切换监控管线
 */
export const toggleApi = (pipelineId) => {
  return http.post(`/washer/pipeline/toggle/${pipelineId}`)
}
/**
 * 分页查询所有管线
 */
export const listApi = (data, pageNum, size) => {
  return http.post(`/washer/pipeline/list/${pageNum}/${size}`, data)
}
/**
 * 启用/停用管线
 */
export const enablePipelineApi = (pipelineId, stop) => {
  return http.post(`/washer/pipeline/enable/${pipelineId}/${stop}`)
}
/**
 * 设置采集周期
 */
export const changeCycleApi = (pipelineId, period) => {
  return http.post(`/washer/pipeline/cycle/${pipelineId}/${period}`)
}
/**
 * 修改管线信息
 */
export const updateInfoApi = (data) => {
  return http.post(`/washer/pipeline/update`, data)
}
